package com.chiv.testribbon.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("test")
public class TestRibbonController {
    @Autowired
    RestTemplate restTemplate;
    @Value("${service-url}")
    String serviceUrl;
    @GetMapping("ribbon")
    public Object getList(){
        return restTemplate.getForEntity(serviceUrl+"/person/list",Object.class);
    }
}
